﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master/List.Master" AutoEventWireup="true"
    CodeBehind="Drivers.aspx.cs" Inherits="MTC.Web.Forms.Drivers" %>

<%@ Register Src="../Controls/Menu.ascx" TagName="Menu" TagPrefix="uc1" %>
<%@ Register Src="../Controls/NavMenu.ascx" TagName="NavMenu" TagPrefix="uc3" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v9.1, Version=9.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dxwgv" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v9.1, Version=9.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v9.1.Export, Version=9.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView.Export" TagPrefix="dxwgv" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CPHeader" runat="server">
    <table width="100%">
        <tr align="right">
            <td align="right">
                <asp:ImageButton ID="btnExcel" runat="server" ImageUrl="~/Images/excel.jpg" 
                    onclick="btnExcel_Click" />&nbsp;<asp:ImageButton
                    ID="btnPdf" runat="server" ImageUrl="~/Images/pdf.jpg" 
                    onclick="btnPdf_Click" />&nbsp;<asp:ImageButton ID="btnRtf"
                        runat="server" ImageUrl="~/Images/rtf.jpg" onclick="btnRtf_Click" />
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CPNav" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="CPMain" runat="server">
    <dxwgv:ASPxGridView ID="grdDrivers" runat="server" CssFilePath="~/App_Themes/Soft Orange/{0}/styles.css"
        CssPostfix="Soft_Orange" AutoGenerateColumns="False" DataSourceID="grdDriversDataSource"
        KeyFieldName="DriverId" Width="100%">
        <Styles CssFilePath="~/App_Themes/Soft Orange/{0}/styles.css" 
            CssPostfix="Soft_Orange" GroupButtonWidth="28">
            <Header ImageSpacing="5px" SortingImageSpacing="5px">
            </Header>
            <LoadingPanel ImageSpacing="10px">
            </LoadingPanel>
        </Styles>
        <SettingsLoadingPanel Text="" />
        <Images ImageFolder="~/App_Themes/Soft Orange/{0}/">
            <CollapsedButton Height="14px" 
                Url="~/App_Themes/Soft Orange/GridView/gvCollapsedButton.png" Width="13px" />
            <ExpandedButton Height="13px" 
                Url="~/App_Themes/Soft Orange/GridView/gvExpandedButton.png" Width="13px" />
            <DetailCollapsedButton Height="14px" 
                Url="~/App_Themes/Soft Orange/GridView/gvCollapsedButton.png" Width="13px" />
            <DetailExpandedButton Height="13px" 
                Url="~/App_Themes/Soft Orange/GridView/gvExpandedButton.png" Width="13px" />
            <HeaderFilter Height="19px" 
                Url="~/App_Themes/Soft Orange/GridView/gvHeaderFilter.png" Width="19px" />
            <HeaderActiveFilter Height="19px" 
                Url="~/App_Themes/Soft Orange/GridView/gvHeaderFilterActive.png" Width="19px" />
            <HeaderSortDown Height="3px" 
                Url="~/App_Themes/Soft Orange/GridView/gvHeaderSortDown.png" Width="6px" />
            <HeaderSortUp Height="3px" 
                Url="~/App_Themes/Soft Orange/GridView/gvHeaderSortUp.png" Width="6px" />
            <FilterRowButton Height="13px" Width="13px" />
            <CustomizationWindowClose Height="18px" Width="18px" />
            <PopupEditFormWindowClose Height="18px" Width="18px" />
            <WindowResizer Height="12px" 
                Url="~/App_Themes/Soft Orange/GridView/WindowResizer.png" Width="12px" />
            <FilterBuilderClose Height="18px" Width="18px" />
        </Images>
        <SettingsPager PageSize="50">
            <AllButton>
                <Image Height="19px" Width="28px" />
            </AllButton>
            <FirstPageButton>
                <Image Height="19px" Width="23px" />
            </FirstPageButton>
            <LastPageButton>
                <Image Height="19px" Width="23px" />
            </LastPageButton>
            <NextPageButton>
                <Image Height="19px" Width="19px" />
            </NextPageButton>
            <PrevPageButton>
                <Image Height="19px" Width="19px" />
            </PrevPageButton>
        </SettingsPager>
        <Paddings Padding="1px" />
        <Settings ShowGroupPanel="True" ShowFilterRow="false" />
         <GroupSummary>
             <dxwgv:ASPxSummaryItem FieldName="DriverId" SummaryType="Count" />
         </GroupSummary>        
        <Columns>
            <dxwgv:GridViewDataTextColumn FieldName="DriverId" VisibleIndex="0" Visible="False">
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn FieldName="FirstName" VisibleIndex="0">
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn FieldName="LastName" Caption="Last Name" VisibleIndex="1">
                <DataItemTemplate>
                    <a href="DriverEdit.aspx?DriverId=<%# Eval("DriverId") %>">
                        <%# Eval("LastName")%></a>
                </DataItemTemplate>
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn FieldName="Mobile1" VisibleIndex="2">
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn FieldName="Mobile2" VisibleIndex="3">
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn FieldName="TaxiLicience" VisibleIndex="4">
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataDateColumn FieldName="TaxiLicienceExpiry" VisibleIndex="5">
                <PropertiesDateEdit DisplayFormatString="{0:d}">
                </PropertiesDateEdit>
            </dxwgv:GridViewDataDateColumn>
            <dxwgv:GridViewCommandColumn VisibleIndex="6">
                <DeleteButton Visible="True">
                </DeleteButton>
                <ClearFilterButton Visible="True">
                </ClearFilterButton>
            </dxwgv:GridViewCommandColumn>
        </Columns>
        <Settings ShowFilterRow="True" />
        <SettingsBehavior ConfirmDelete="True"  />
        <ImagesEditors>
            <CalendarPrevYear Height="19px" 
                Url="~/App_Themes/Soft Orange/Editors/edtCalendarPrevYear.png" Width="23px" />
            <CalendarPrevMonth Height="19px" 
                Url="~/App_Themes/Soft Orange/Editors/edtCalendarPrevMonth.png" Width="19px" />
            <CalendarNextMonth Height="19px" 
                Url="~/App_Themes/Soft Orange/Editors/edtCalendarNextMonth.png" Width="19px" />
            <CalendarNextYear Height="19px" 
                Url="~/App_Themes/Soft Orange/Editors/edtCalendarNextYear.png" Width="23px" />
        </ImagesEditors>
    </dxwgv:ASPxGridView>
    <dxwgv:ASPxGridViewExporter ID="GrdExport" runat="server" GridViewID="grdDrivers">
    </dxwgv:ASPxGridViewExporter>
    <asp:ObjectDataSource ID="grdDriversDataSource" runat="server" SelectMethod="GetDrivers"
        DeleteMethod="DeleteADriver" TypeName="MTC.Web.Business.Drivers"></asp:ObjectDataSource>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="CPSideBar" runat="server">
    <uc3:NavMenu ID="NavMenu1" runat="server" />
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="CPFooter" runat="server">
</asp:Content>
